<?php
$smarty->configLoad($lang . '/report.module.php');
$language = parse_ini_file($lang . '/breadcrumb.module.php', true);
$breadcrumb = $language['report'];
// Status 0 = Not Checked & Status = 1 in work
$value = '';
$sql = 'SELECT * FROM '.DB_CMS.'.module_preport WHERE status = 1 OR status = 0';
$dbh = $connection->prepare($sql);
$dbh->execute();
$user = new user;
foreach($dbh->fetchAll(PDO::FETCH_ASSOC) as $row) {
	$row['username'] = $user->getName($row['userID']);
	$row['report'] = $user->getName($row['reportID']);
	$value[] = $row;
}
$smarty->assign('new_value', $value);

$value = '';
$sql = 'SELECT * FROM '.DB_CMS.'.module_preport WHERE status = 2';
$dbh = $connection->prepare($sql);
$dbh->execute();
$user = new user;
foreach($dbh->fetchAll(PDO::FETCH_ASSOC) as $row) {
	$row['username'] = $user->getName($row['userID']);
	$row['report'] = $user->getName($row['reportID']);
	$value[] = $row;
}
$smarty->assign('old_value', $value);
$template = 'report/index.tpl';
?>